package io;

import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStreamWriter;
import java.nio.charset.StandardCharsets;

public class OswDemo {
    public static void main(String[] args) throws IOException {
        FileOutputStream fos = new FileOutputStream("osw.txt");
        OutputStreamWriter otsm = new OutputStreamWriter(fos, StandardCharsets.UTF_8);

        otsm.write("神奇先生");
        otsm.write("超人");
        System.out.println("写出完毕");
        otsm.close();
    }
}
